import time
from PublicChartDisplay import models

class _demo_mag(object):
    def showData_demo(self,data):
        inData = list(data)
        all_data = []
        i = 1
        # for i in inData:
        #     all_data['data_'+ i] = {}
        #     if i%2 == 0:
        #         all_data['data_' + i]['location'] = 'r'
        #     else:
        #         all_data['data_' + i]['location'] = 'l'
        #     all_data['data_' + i]['type'] = "岗位 城市 饼"
        #     all_data['data_' + i]['url'] = str(i)
        #     all_data['data_' + i]['title'] = '就业岗位最多的前10个城市'
        #     all_data['data_' + i]['abstract'] = '目前国内本专业就业岗位最多的五座城市是北京,上海,广州,深圳,成都.这也与人们预期的结果相符.'
        #     all_data['data_' + i]['author'] = '官方发布'
        #     all_data['data_' + i]['time'] = '2017/8/15'
        #     now_time_m = int(time.strftime('%m', time.localtime(time.time()))) - 8
        #     now_time_d = int(time.strftime('%d', time.localtime(time.time())))
        #     data_1['time_D'] = str(now_time_m) + '月' + str(now_time_d) + '天前'
        #     all_data.append(data_1)
        #
        #     i += 1

        data_1 = {}
        data_1['location'] = 'l'
        data_1['type'] = "岗位 城市 饼"
        data_1['url'] = '1'
        data_1['title'] = '就业岗位最多的前10个城市'
        data_1['abstract'] = '目前国内本专业就业岗位最多的五座城市是北京,上海,广州,深圳,成都.这也与人们预期的结果相符.'
        data_1['author'] = '官方发布'
        data_1['time'] = '2017/8/15'
        now_time_m = int(time.strftime('%m',time.localtime(time.time()))) - 8
        now_time_d = int(time.strftime('%d',time.localtime(time.time())))
        data_1['time_D'] = str(now_time_m) + '月' + str(now_time_d) + '天前'
        all_data.append(data_1)


        data_2 = {}
        data_2['location'] = 'r'
        data_2['type'] = "工资 城市 柱"
        data_2['url'] = '2'
        data_2['title'] = '部门城市工资情况'
        data_2['abstract'] = '目前国内本专业就业岗位最多的五座城市是北京,上海,广州,深圳,成都.这也与人们预期的结果相符.'
        data_2['author'] = '官方发布'
        data_2['time'] = '2017/9/1'
        now_time_m = int(time.strftime('%m', time.localtime(time.time()))) - 8
        now_time_d = int(time.strftime('%d', time.localtime(time.time())))
        data_2['time_D'] = str(now_time_m) + '月' + str(now_time_d) + '天前'
        all_data.append(data_2)


        data_3 = {}
        data_3['location'] = 'l'
        data_3['type'] = "就业 城市 地"
        data_3['url'] = '3'
        data_3['title'] = '全国部分城市就业量分布'
        data_3['abstract'] = '目前国内本专业就业岗位最多的五座城市是北京,上海,广州,深圳,成都.这也与人们预期的结果相符.'
        data_3['author'] = '官方发布'
        data_3['time'] = '2017/10/7'
        now_time_m = int(time.strftime('%m', time.localtime(time.time()))) - 8
        now_time_d = int(time.strftime('%d', time.localtime(time.time())))
        data_3['time_D'] = str(now_time_m) + '月' + str(now_time_d) + '天前'
        all_data.append(data_3)

        data_4 = {}
        data_4['location'] = 'r'
        data_4['type'] = "岗位 南丁格尔"
        data_4['url'] = '4'
        data_4['title'] = '就业岗位数量南丁格尔图'
        data_4['abstract'] = '目前国内本专业就业岗位最多的五座城市是北京,上海,广州,深圳,成都.这也与人们预期的结果相符.'
        data_4['author'] = '官方发布'
        data_4['time'] = '2017/10/7'
        now_time_m = int(time.strftime('%m', time.localtime(time.time()))) - 9
        now_time_d = int(time.strftime('%d', time.localtime(time.time())))
        data_4['time_D'] = str(now_time_m) + '月' + str(now_time_d) + '天前'
        all_data.append(data_4)

        data_5 = {}
        data_5['location'] = 'l'
        data_5['type'] = "关键词 雷达图"
        data_5['url'] = '5'
        data_5['title'] = '各关键词雷达图'
        data_5['abstract'] = '根据一关键词生成的雷达图.'
        data_5['author'] = '官方发布'
        data_5['time'] = '2018/04/02'
        now_time_m = int(time.strftime('%m', time.localtime(time.time()))) - 9
        now_time_d = int(time.strftime('%d', time.localtime(time.time())))
        data_5['time_D'] = str(now_time_m) + '月' + str(now_time_d) + '天前'
        all_data.append(data_5)

        data_6 = {}
        data_6['location'] = 'r'
        data_6['url'] = '6'
        data_6['type'] = "gongzi"
        data_6['title'] = '招聘需求的“关键词”'
        data_6['abstract'] = '大多数招聘岗位的欲求关键词.'
        data_6['author'] = '官方发布'
        data_6['time'] = '2017/10/7'
        now_time_m = int(time.strftime('%m', time.localtime(time.time()))) - 10
        now_time_d = int(time.strftime('%d', time.localtime(time.time())))
        data_6['time_D'] = str(now_time_m) + '月' + str(now_time_d) + '天前'
        all_data.append(data_6)

        data_7 = {}
        data_7['location'] = 'l'
        data_7['url'] = '7'
        data_7['type'] = "chengshi"
        data_7['title'] = '需求与城市对应图'
        data_7['abstract'] = '目前国内本的需求与城市的对比.'
        data_7['author'] = '官方发布'
        data_7['time'] = '2017/10/7'
        now_time_m = int(time.strftime('%m', time.localtime(time.time()))) - 10
        now_time_d = int(time.strftime('%d', time.localtime(time.time())))
        data_7['time_D'] = str(now_time_m) + '月' + str(now_time_d) + '天前'
        all_data.append(data_7)

        data_8 = {}
        data_8['location'] = 'r'
        data_8['url'] = '8'
        data_8['type'] = "gangwei"
        data_8['title'] = '各岗位工资情况'
        data_8['abstract'] = '目前各岗位的工资情况.'
        data_8['author'] = '官方发布'
        data_8['time'] = '2017/10/7'
        now_time_m = int(time.strftime('%m', time.localtime(time.time()))) - 10
        now_time_d = int(time.strftime('%d', time.localtime(time.time())))
        data_8['time_D'] = str(now_time_m) + '月' + str(now_time_d) + '天前'
        all_data.append(data_8)

        data_9 = {}
        data_9['location'] = 'l'
        data_9['url'] = '9'
        data_9['type'] = "测试 测试 测试"
        data_9['title'] = '这只是一个测试啊啊'
        data_9['abstract'] = '这只是一个测试啊啊这只是一个测试啊啊.'
        data_9['author'] = '官方发布'
        data_9['time'] = '刚刚'
        now_time_m = int(time.strftime('%m', time.localtime(time.time()))) - 10
        now_time_d = int(time.strftime('%d', time.localtime(time.time())))
        data_9['time_D'] = '刚刚'
        all_data.append(data_9)


        # data_1 = {}
        # data_1['location'] = 'l'
        # data_1['type'] = "岗位 城市 饼"
        # data_1['url'] = '1'
        # data_1['title'] = '就业岗位最多的前10个城市'
        # data_1['abstract'] = '目前国内本专业就业岗位最多的五座城市是北京,上海,广州,深圳,成都.这也与人们预期的结果相符.'
        # data_1['author'] = '官方发布'
        # data_1['time'] = '2017/8/15'
        # now_time_m = int(time.strftime('%m', time.localtime(time.time()))) - 8
        # now_time_d = int(time.strftime('%d', time.localtime(time.time())))
        # data_1['time_D'] = str(now_time_m) + '月' + str(now_time_d) + '天前'
        # all_data.append(data_1)
        #
        # data_2 = {}
        # data_2['location'] = 'r'
        # data_2['type'] = "工资 城市 柱"
        # data_2['url'] = '2'
        # data_2['title'] = '部门城市工资情况'
        # data_2['abstract'] = '目前国内本专业就业岗位最多的五座城市是北京,上海,广州,深圳,成都.这也与人们预期的结果相符.'
        # data_2['author'] = '官方发布'
        # data_2['time'] = '2017/9/1'
        # now_time_m = int(time.strftime('%m', time.localtime(time.time()))) - 8
        # now_time_d = int(time.strftime('%d', time.localtime(time.time())))
        # data_2['time_D'] = str(now_time_m) + '月' + str(now_time_d) + '天前'
        # all_data.append(data_2)
        #
        # data_3 = {}
        # data_3['location'] = 'l'
        # data_3['type'] = "就业 城市 地"
        # data_3['url'] = '3'
        # data_3['title'] = '全国部分城市就业量分布'
        # data_3['abstract'] = '目前国内本专业就业岗位最多的五座城市是北京,上海,广州,深圳,成都.这也与人们预期的结果相符.'
        # data_3['author'] = '官方发布'
        # data_3['time'] = '2017/10/7'
        # now_time_m = int(time.strftime('%m', time.localtime(time.time()))) - 8
        # now_time_d = int(time.strftime('%d', time.localtime(time.time())))
        # data_3['time_D'] = str(now_time_m) + '月' + str(now_time_d) + '天前'
        # all_data.append(data_3)
        #
        # data_5 = {}
        # data_5['location'] = 'r'
        # data_5['type'] = "关键词 雷达图"
        # data_5['url'] = '5'
        # data_5['title'] = '各关键词雷达图'
        # data_5['abstract'] = '根据一关键词生成的雷达图.'
        # data_5['author'] = '官方发布'
        # data_5['time'] = '2018/04/02'
        # now_time_m = int(time.strftime('%m', time.localtime(time.time()))) - 9
        # now_time_d = int(time.strftime('%d', time.localtime(time.time())))
        # data_5['time_D'] = str(now_time_m) + '月' + str(now_time_d) + '天前'
        # all_data.append(data_5)
        #
        # data_6 = {}
        # data_6['location'] = 'l'
        # data_6['url'] = '6'
        # data_6['type'] = "gongzi"
        # data_6['title'] = '招聘需求的“关键词”'
        # data_6['abstract'] = '大多数招聘岗位的欲求关键词.'
        # data_6['author'] = '官方发布'
        # data_6['time'] = '2017/10/7'
        # now_time_m = int(time.strftime('%m', time.localtime(time.time()))) - 10
        # now_time_d = int(time.strftime('%d', time.localtime(time.time())))
        # data_6['time_D'] = str(now_time_m) + '月' + str(now_time_d) + '天前'
        # all_data.append(data_6)
        #
        # data_7 = {}
        # data_7['location'] = 'r'
        # data_7['url'] = '7'
        # data_7['type'] = "chengshi"
        # data_7['title'] = '需求与城市对应图'
        # data_7['abstract'] = '目前国内本的需求与城市的对比.'
        # data_7['author'] = '官方发布'
        # data_7['time'] = '2017/10/7'
        # now_time_m = int(time.strftime('%m', time.localtime(time.time()))) - 10
        # now_time_d = int(time.strftime('%d', time.localtime(time.time())))
        # data_7['time_D'] = str(now_time_m) + '月' + str(now_time_d) + '天前'
        # all_data.append(data_7)
        #
        # data_8 = {}
        # data_8['location'] = 'l'
        # data_8['url'] = '8'
        # data_8['type'] = "gangwei"
        # data_8['title'] = '各岗位工资情况'
        # data_8['abstract'] = '目前各岗位的工资情况.'
        # data_8['author'] = '官方发布'
        # data_8['time'] = '2017/10/7'
        # now_time_m = int(time.strftime('%m', time.localtime(time.time()))) - 10
        # now_time_d = int(time.strftime('%d', time.localtime(time.time())))
        # data_8['time_D'] = str(now_time_m) + '月' + str(now_time_d) + '天前'
        # all_data.append(data_8)

        return all_data

if __name__ == "__main__":
    pass
